{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f530ff4d-42e1-4d60-bc2d-3f09810a3136",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import pyecharts\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "44b8d721-8c52-4b9a-900d-6669e27ab5ad",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_excel(\"C:/Users/86139/Desktop/高等教育数据.xlsx\",sheet_name=\"Sheet1\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d47ebe8e-5ecc-4c99-a64c-0014e1777b48",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>地区</th>\n",
       "      <th>2022年</th>\n",
       "      <th>2021年</th>\n",
       "      <th>2020年</th>\n",
       "      <th>2019年</th>\n",
       "      <th>2018年</th>\n",
       "      <th>2017年</th>\n",
       "      <th>2016年</th>\n",
       "      <th>2015年</th>\n",
       "      <th>2014年</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>北京市</td>\n",
       "      <td>14.00</td>\n",
       "      <td>13.63</td>\n",
       "      <td>13.48</td>\n",
       "      <td>13.09</td>\n",
       "      <td>13.01</td>\n",
       "      <td>12.82</td>\n",
       "      <td>12.77</td>\n",
       "      <td>12.63</td>\n",
       "      <td>12.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>天津市</td>\n",
       "      <td>9.15</td>\n",
       "      <td>8.96</td>\n",
       "      <td>9.14</td>\n",
       "      <td>9.02</td>\n",
       "      <td>8.91</td>\n",
       "      <td>8.57</td>\n",
       "      <td>8.51</td>\n",
       "      <td>8.21</td>\n",
       "      <td>8.11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>河北省</td>\n",
       "      <td>22.91</td>\n",
       "      <td>21.88</td>\n",
       "      <td>21.83</td>\n",
       "      <td>21.29</td>\n",
       "      <td>20.02</td>\n",
       "      <td>18.91</td>\n",
       "      <td>18.21</td>\n",
       "      <td>16.72</td>\n",
       "      <td>16.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>山西省</td>\n",
       "      <td>12.49</td>\n",
       "      <td>12.48</td>\n",
       "      <td>12.57</td>\n",
       "      <td>12.28</td>\n",
       "      <td>12.20</td>\n",
       "      <td>12.11</td>\n",
       "      <td>11.98</td>\n",
       "      <td>11.67</td>\n",
       "      <td>11.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>内蒙古自治区</td>\n",
       "      <td>6.44</td>\n",
       "      <td>6.38</td>\n",
       "      <td>6.35</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.28</td>\n",
       "      <td>6.24</td>\n",
       "      <td>6.26</td>\n",
       "      <td>5.96</td>\n",
       "      <td>5.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>辽宁省</td>\n",
       "      <td>18.10</td>\n",
       "      <td>17.45</td>\n",
       "      <td>17.51</td>\n",
       "      <td>16.95</td>\n",
       "      <td>16.84</td>\n",
       "      <td>16.63</td>\n",
       "      <td>16.60</td>\n",
       "      <td>16.60</td>\n",
       "      <td>18.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>12.95</td>\n",
       "      <td>12.14</td>\n",
       "      <td>12.21</td>\n",
       "      <td>12.07</td>\n",
       "      <td>12.01</td>\n",
       "      <td>11.83</td>\n",
       "      <td>11.88</td>\n",
       "      <td>11.78</td>\n",
       "      <td>11.42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>黑龙江省</td>\n",
       "      <td>14.17</td>\n",
       "      <td>13.76</td>\n",
       "      <td>13.85</td>\n",
       "      <td>13.57</td>\n",
       "      <td>13.39</td>\n",
       "      <td>13.00</td>\n",
       "      <td>12.61</td>\n",
       "      <td>12.34</td>\n",
       "      <td>12.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>上海市</td>\n",
       "      <td>10.04</td>\n",
       "      <td>9.82</td>\n",
       "      <td>9.82</td>\n",
       "      <td>9.57</td>\n",
       "      <td>9.58</td>\n",
       "      <td>9.51</td>\n",
       "      <td>9.31</td>\n",
       "      <td>8.92</td>\n",
       "      <td>8.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>江苏省</td>\n",
       "      <td>30.01</td>\n",
       "      <td>28.73</td>\n",
       "      <td>28.30</td>\n",
       "      <td>27.43</td>\n",
       "      <td>27.18</td>\n",
       "      <td>26.74</td>\n",
       "      <td>26.88</td>\n",
       "      <td>25.60</td>\n",
       "      <td>25.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>浙江省</td>\n",
       "      <td>16.76</td>\n",
       "      <td>15.62</td>\n",
       "      <td>15.59</td>\n",
       "      <td>15.16</td>\n",
       "      <td>15.09</td>\n",
       "      <td>14.62</td>\n",
       "      <td>14.54</td>\n",
       "      <td>14.80</td>\n",
       "      <td>14.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>安徽省</td>\n",
       "      <td>18.19</td>\n",
       "      <td>17.37</td>\n",
       "      <td>16.94</td>\n",
       "      <td>16.61</td>\n",
       "      <td>16.39</td>\n",
       "      <td>16.04</td>\n",
       "      <td>16.05</td>\n",
       "      <td>15.76</td>\n",
       "      <td>15.23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>福建省</td>\n",
       "      <td>13.74</td>\n",
       "      <td>13.09</td>\n",
       "      <td>13.05</td>\n",
       "      <td>12.84</td>\n",
       "      <td>12.52</td>\n",
       "      <td>11.90</td>\n",
       "      <td>11.80</td>\n",
       "      <td>12.17</td>\n",
       "      <td>12.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>江西省</td>\n",
       "      <td>17.27</td>\n",
       "      <td>15.52</td>\n",
       "      <td>15.30</td>\n",
       "      <td>14.57</td>\n",
       "      <td>14.18</td>\n",
       "      <td>13.49</td>\n",
       "      <td>13.51</td>\n",
       "      <td>12.38</td>\n",
       "      <td>12.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>山东省</td>\n",
       "      <td>28.01</td>\n",
       "      <td>26.65</td>\n",
       "      <td>26.67</td>\n",
       "      <td>26.46</td>\n",
       "      <td>25.82</td>\n",
       "      <td>26.29</td>\n",
       "      <td>26.27</td>\n",
       "      <td>23.70</td>\n",
       "      <td>23.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>河南省</td>\n",
       "      <td>31.52</td>\n",
       "      <td>29.73</td>\n",
       "      <td>29.29</td>\n",
       "      <td>28.73</td>\n",
       "      <td>27.99</td>\n",
       "      <td>25.80</td>\n",
       "      <td>25.62</td>\n",
       "      <td>24.17</td>\n",
       "      <td>23.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>湖北省</td>\n",
       "      <td>23.71</td>\n",
       "      <td>22.47</td>\n",
       "      <td>22.35</td>\n",
       "      <td>21.74</td>\n",
       "      <td>21.46</td>\n",
       "      <td>21.30</td>\n",
       "      <td>21.28</td>\n",
       "      <td>20.77</td>\n",
       "      <td>20.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>湖南省</td>\n",
       "      <td>22.48</td>\n",
       "      <td>20.10</td>\n",
       "      <td>19.57</td>\n",
       "      <td>18.88</td>\n",
       "      <td>18.39</td>\n",
       "      <td>17.83</td>\n",
       "      <td>17.32</td>\n",
       "      <td>16.77</td>\n",
       "      <td>16.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>广东省</td>\n",
       "      <td>31.09</td>\n",
       "      <td>29.37</td>\n",
       "      <td>29.71</td>\n",
       "      <td>28.82</td>\n",
       "      <td>28.28</td>\n",
       "      <td>27.66</td>\n",
       "      <td>27.51</td>\n",
       "      <td>26.96</td>\n",
       "      <td>26.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>广西壮族自治区</td>\n",
       "      <td>14.62</td>\n",
       "      <td>13.34</td>\n",
       "      <td>13.62</td>\n",
       "      <td>13.00</td>\n",
       "      <td>12.52</td>\n",
       "      <td>11.79</td>\n",
       "      <td>11.48</td>\n",
       "      <td>10.62</td>\n",
       "      <td>9.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>海南省</td>\n",
       "      <td>3.08</td>\n",
       "      <td>2.99</td>\n",
       "      <td>3.15</td>\n",
       "      <td>3.12</td>\n",
       "      <td>2.92</td>\n",
       "      <td>2.80</td>\n",
       "      <td>2.80</td>\n",
       "      <td>2.70</td>\n",
       "      <td>2.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>重庆市</td>\n",
       "      <td>12.27</td>\n",
       "      <td>11.97</td>\n",
       "      <td>11.98</td>\n",
       "      <td>11.77</td>\n",
       "      <td>11.39</td>\n",
       "      <td>11.29</td>\n",
       "      <td>11.16</td>\n",
       "      <td>11.00</td>\n",
       "      <td>10.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>四川省</td>\n",
       "      <td>26.21</td>\n",
       "      <td>24.54</td>\n",
       "      <td>24.29</td>\n",
       "      <td>23.52</td>\n",
       "      <td>23.02</td>\n",
       "      <td>22.51</td>\n",
       "      <td>21.82</td>\n",
       "      <td>20.59</td>\n",
       "      <td>18.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>贵州省</td>\n",
       "      <td>8.99</td>\n",
       "      <td>8.96</td>\n",
       "      <td>9.64</td>\n",
       "      <td>9.47</td>\n",
       "      <td>9.18</td>\n",
       "      <td>8.67</td>\n",
       "      <td>8.15</td>\n",
       "      <td>6.44</td>\n",
       "      <td>6.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>云南省</td>\n",
       "      <td>12.36</td>\n",
       "      <td>11.51</td>\n",
       "      <td>11.37</td>\n",
       "      <td>10.82</td>\n",
       "      <td>10.49</td>\n",
       "      <td>10.32</td>\n",
       "      <td>10.06</td>\n",
       "      <td>9.70</td>\n",
       "      <td>9.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>西藏自治区</td>\n",
       "      <td>0.70</td>\n",
       "      <td>0.72</td>\n",
       "      <td>0.73</td>\n",
       "      <td>0.68</td>\n",
       "      <td>0.61</td>\n",
       "      <td>0.58</td>\n",
       "      <td>0.60</td>\n",
       "      <td>0.61</td>\n",
       "      <td>0.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>陕西省</td>\n",
       "      <td>18.14</td>\n",
       "      <td>17.78</td>\n",
       "      <td>17.75</td>\n",
       "      <td>17.20</td>\n",
       "      <td>16.74</td>\n",
       "      <td>16.46</td>\n",
       "      <td>16.10</td>\n",
       "      <td>15.94</td>\n",
       "      <td>16.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>甘肃省</td>\n",
       "      <td>7.55</td>\n",
       "      <td>7.61</td>\n",
       "      <td>7.40</td>\n",
       "      <td>7.30</td>\n",
       "      <td>7.28</td>\n",
       "      <td>7.16</td>\n",
       "      <td>7.23</td>\n",
       "      <td>7.10</td>\n",
       "      <td>7.28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>青海省</td>\n",
       "      <td>1.23</td>\n",
       "      <td>1.22</td>\n",
       "      <td>0.98</td>\n",
       "      <td>1.11</td>\n",
       "      <td>1.08</td>\n",
       "      <td>0.99</td>\n",
       "      <td>0.92</td>\n",
       "      <td>0.89</td>\n",
       "      <td>0.87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>宁夏回族自治区</td>\n",
       "      <td>2.53</td>\n",
       "      <td>2.41</td>\n",
       "      <td>2.31</td>\n",
       "      <td>2.20</td>\n",
       "      <td>2.12</td>\n",
       "      <td>2.04</td>\n",
       "      <td>1.95</td>\n",
       "      <td>1.89</td>\n",
       "      <td>1.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>7.22</td>\n",
       "      <td>6.40</td>\n",
       "      <td>6.35</td>\n",
       "      <td>5.68</td>\n",
       "      <td>5.27</td>\n",
       "      <td>4.83</td>\n",
       "      <td>4.23</td>\n",
       "      <td>4.02</td>\n",
       "      <td>3.79</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          地区  2022年  2021年  2020年  2019年  2018年  2017年  2016年  2015年  2014年\n",
       "0        北京市  14.00  13.63  13.48  13.09  13.01  12.82  12.77  12.63  12.53\n",
       "1        天津市   9.15   8.96   9.14   9.02   8.91   8.57   8.51   8.21   8.11\n",
       "2        河北省  22.91  21.88  21.83  21.29  20.02  18.91  18.21  16.72  16.44\n",
       "3        山西省  12.49  12.48  12.57  12.28  12.20  12.11  11.98  11.67  11.30\n",
       "4     内蒙古自治区   6.44   6.38   6.35   6.32   6.28   6.24   6.26   5.96   5.85\n",
       "5        辽宁省  18.10  17.45  17.51  16.95  16.84  16.63  16.60  16.60  18.05\n",
       "6        吉林省  12.95  12.14  12.21  12.07  12.01  11.83  11.88  11.78  11.42\n",
       "7       黑龙江省  14.17  13.76  13.85  13.57  13.39  13.00  12.61  12.34  12.50\n",
       "8        上海市  10.04   9.82   9.82   9.57   9.58   9.51   9.31   8.92   8.84\n",
       "9        江苏省  30.01  28.73  28.30  27.43  27.18  26.74  26.88  25.60  25.06\n",
       "10       浙江省  16.76  15.62  15.59  15.16  15.09  14.62  14.54  14.80  14.85\n",
       "11       安徽省  18.19  17.37  16.94  16.61  16.39  16.04  16.05  15.76  15.23\n",
       "12       福建省  13.74  13.09  13.05  12.84  12.52  11.90  11.80  12.17  12.06\n",
       "13       江西省  17.27  15.52  15.30  14.57  14.18  13.49  13.51  12.38  12.68\n",
       "14       山东省  28.01  26.65  26.67  26.46  25.82  26.29  26.27  23.70  23.38\n",
       "15       河南省  31.52  29.73  29.29  28.73  27.99  25.80  25.62  24.17  23.55\n",
       "16       湖北省  23.71  22.47  22.35  21.74  21.46  21.30  21.28  20.77  20.38\n",
       "17       湖南省  22.48  20.10  19.57  18.88  18.39  17.83  17.32  16.77  16.54\n",
       "18       广东省  31.09  29.37  29.71  28.82  28.28  27.66  27.51  26.96  26.15\n",
       "19   广西壮族自治区  14.62  13.34  13.62  13.00  12.52  11.79  11.48  10.62   9.40\n",
       "20       海南省   3.08   2.99   3.15   3.12   2.92   2.80   2.80   2.70   2.60\n",
       "21       重庆市  12.27  11.97  11.98  11.77  11.39  11.29  11.16  11.00  10.61\n",
       "22       四川省  26.21  24.54  24.29  23.52  23.02  22.51  21.82  20.59  18.50\n",
       "23       贵州省   8.99   8.96   9.64   9.47   9.18   8.67   8.15   6.44   6.57\n",
       "24       云南省  12.36  11.51  11.37  10.82  10.49  10.32  10.06   9.70   9.60\n",
       "25     西藏自治区   0.70   0.72   0.73   0.68   0.61   0.58   0.60   0.61   0.56\n",
       "26       陕西省  18.14  17.78  17.75  17.20  16.74  16.46  16.10  15.94  16.84\n",
       "27       甘肃省   7.55   7.61   7.40   7.30   7.28   7.16   7.23   7.10   7.28\n",
       "28       青海省   1.23   1.22   0.98   1.11   1.08   0.99   0.92   0.89   0.87\n",
       "29   宁夏回族自治区   2.53   2.41   2.31   2.20   2.12   2.04   1.95   1.89   1.90\n",
       "30  新疆维吾尔自治区   7.22   6.40   6.35   5.68   5.27   4.83   4.23   4.02   3.79"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f5b1a2d0-65bc-4443-a3a1-3895802d6d3f",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.columns=['地区','2022','2021','2020','2019','2018','2017','2016','2015','2014']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "5f64d7d9-9187-4403-b45f-982e4be93f91",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>地区</th>\n",
       "      <th>2022</th>\n",
       "      <th>2021</th>\n",
       "      <th>2020</th>\n",
       "      <th>2019</th>\n",
       "      <th>2018</th>\n",
       "      <th>2017</th>\n",
       "      <th>2016</th>\n",
       "      <th>2015</th>\n",
       "      <th>2014</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>北京市</td>\n",
       "      <td>14.00</td>\n",
       "      <td>13.63</td>\n",
       "      <td>13.48</td>\n",
       "      <td>13.09</td>\n",
       "      <td>13.01</td>\n",
       "      <td>12.82</td>\n",
       "      <td>12.77</td>\n",
       "      <td>12.63</td>\n",
       "      <td>12.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>天津市</td>\n",
       "      <td>9.15</td>\n",
       "      <td>8.96</td>\n",
       "      <td>9.14</td>\n",
       "      <td>9.02</td>\n",
       "      <td>8.91</td>\n",
       "      <td>8.57</td>\n",
       "      <td>8.51</td>\n",
       "      <td>8.21</td>\n",
       "      <td>8.11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>河北省</td>\n",
       "      <td>22.91</td>\n",
       "      <td>21.88</td>\n",
       "      <td>21.83</td>\n",
       "      <td>21.29</td>\n",
       "      <td>20.02</td>\n",
       "      <td>18.91</td>\n",
       "      <td>18.21</td>\n",
       "      <td>16.72</td>\n",
       "      <td>16.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>山西省</td>\n",
       "      <td>12.49</td>\n",
       "      <td>12.48</td>\n",
       "      <td>12.57</td>\n",
       "      <td>12.28</td>\n",
       "      <td>12.20</td>\n",
       "      <td>12.11</td>\n",
       "      <td>11.98</td>\n",
       "      <td>11.67</td>\n",
       "      <td>11.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>内蒙古自治区</td>\n",
       "      <td>6.44</td>\n",
       "      <td>6.38</td>\n",
       "      <td>6.35</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.28</td>\n",
       "      <td>6.24</td>\n",
       "      <td>6.26</td>\n",
       "      <td>5.96</td>\n",
       "      <td>5.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>辽宁省</td>\n",
       "      <td>18.10</td>\n",
       "      <td>17.45</td>\n",
       "      <td>17.51</td>\n",
       "      <td>16.95</td>\n",
       "      <td>16.84</td>\n",
       "      <td>16.63</td>\n",
       "      <td>16.60</td>\n",
       "      <td>16.60</td>\n",
       "      <td>18.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>12.95</td>\n",
       "      <td>12.14</td>\n",
       "      <td>12.21</td>\n",
       "      <td>12.07</td>\n",
       "      <td>12.01</td>\n",
       "      <td>11.83</td>\n",
       "      <td>11.88</td>\n",
       "      <td>11.78</td>\n",
       "      <td>11.42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>黑龙江省</td>\n",
       "      <td>14.17</td>\n",
       "      <td>13.76</td>\n",
       "      <td>13.85</td>\n",
       "      <td>13.57</td>\n",
       "      <td>13.39</td>\n",
       "      <td>13.00</td>\n",
       "      <td>12.61</td>\n",
       "      <td>12.34</td>\n",
       "      <td>12.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>上海市</td>\n",
       "      <td>10.04</td>\n",
       "      <td>9.82</td>\n",
       "      <td>9.82</td>\n",
       "      <td>9.57</td>\n",
       "      <td>9.58</td>\n",
       "      <td>9.51</td>\n",
       "      <td>9.31</td>\n",
       "      <td>8.92</td>\n",
       "      <td>8.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>江苏省</td>\n",
       "      <td>30.01</td>\n",
       "      <td>28.73</td>\n",
       "      <td>28.30</td>\n",
       "      <td>27.43</td>\n",
       "      <td>27.18</td>\n",
       "      <td>26.74</td>\n",
       "      <td>26.88</td>\n",
       "      <td>25.60</td>\n",
       "      <td>25.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>浙江省</td>\n",
       "      <td>16.76</td>\n",
       "      <td>15.62</td>\n",
       "      <td>15.59</td>\n",
       "      <td>15.16</td>\n",
       "      <td>15.09</td>\n",
       "      <td>14.62</td>\n",
       "      <td>14.54</td>\n",
       "      <td>14.80</td>\n",
       "      <td>14.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>安徽省</td>\n",
       "      <td>18.19</td>\n",
       "      <td>17.37</td>\n",
       "      <td>16.94</td>\n",
       "      <td>16.61</td>\n",
       "      <td>16.39</td>\n",
       "      <td>16.04</td>\n",
       "      <td>16.05</td>\n",
       "      <td>15.76</td>\n",
       "      <td>15.23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>福建省</td>\n",
       "      <td>13.74</td>\n",
       "      <td>13.09</td>\n",
       "      <td>13.05</td>\n",
       "      <td>12.84</td>\n",
       "      <td>12.52</td>\n",
       "      <td>11.90</td>\n",
       "      <td>11.80</td>\n",
       "      <td>12.17</td>\n",
       "      <td>12.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>江西省</td>\n",
       "      <td>17.27</td>\n",
       "      <td>15.52</td>\n",
       "      <td>15.30</td>\n",
       "      <td>14.57</td>\n",
       "      <td>14.18</td>\n",
       "      <td>13.49</td>\n",
       "      <td>13.51</td>\n",
       "      <td>12.38</td>\n",
       "      <td>12.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>山东省</td>\n",
       "      <td>28.01</td>\n",
       "      <td>26.65</td>\n",
       "      <td>26.67</td>\n",
       "      <td>26.46</td>\n",
       "      <td>25.82</td>\n",
       "      <td>26.29</td>\n",
       "      <td>26.27</td>\n",
       "      <td>23.70</td>\n",
       "      <td>23.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>河南省</td>\n",
       "      <td>31.52</td>\n",
       "      <td>29.73</td>\n",
       "      <td>29.29</td>\n",
       "      <td>28.73</td>\n",
       "      <td>27.99</td>\n",
       "      <td>25.80</td>\n",
       "      <td>25.62</td>\n",
       "      <td>24.17</td>\n",
       "      <td>23.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>湖北省</td>\n",
       "      <td>23.71</td>\n",
       "      <td>22.47</td>\n",
       "      <td>22.35</td>\n",
       "      <td>21.74</td>\n",
       "      <td>21.46</td>\n",
       "      <td>21.30</td>\n",
       "      <td>21.28</td>\n",
       "      <td>20.77</td>\n",
       "      <td>20.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>湖南省</td>\n",
       "      <td>22.48</td>\n",
       "      <td>20.10</td>\n",
       "      <td>19.57</td>\n",
       "      <td>18.88</td>\n",
       "      <td>18.39</td>\n",
       "      <td>17.83</td>\n",
       "      <td>17.32</td>\n",
       "      <td>16.77</td>\n",
       "      <td>16.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>广东省</td>\n",
       "      <td>31.09</td>\n",
       "      <td>29.37</td>\n",
       "      <td>29.71</td>\n",
       "      <td>28.82</td>\n",
       "      <td>28.28</td>\n",
       "      <td>27.66</td>\n",
       "      <td>27.51</td>\n",
       "      <td>26.96</td>\n",
       "      <td>26.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>广西壮族自治区</td>\n",
       "      <td>14.62</td>\n",
       "      <td>13.34</td>\n",
       "      <td>13.62</td>\n",
       "      <td>13.00</td>\n",
       "      <td>12.52</td>\n",
       "      <td>11.79</td>\n",
       "      <td>11.48</td>\n",
       "      <td>10.62</td>\n",
       "      <td>9.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>海南省</td>\n",
       "      <td>3.08</td>\n",
       "      <td>2.99</td>\n",
       "      <td>3.15</td>\n",
       "      <td>3.12</td>\n",
       "      <td>2.92</td>\n",
       "      <td>2.80</td>\n",
       "      <td>2.80</td>\n",
       "      <td>2.70</td>\n",
       "      <td>2.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>重庆市</td>\n",
       "      <td>12.27</td>\n",
       "      <td>11.97</td>\n",
       "      <td>11.98</td>\n",
       "      <td>11.77</td>\n",
       "      <td>11.39</td>\n",
       "      <td>11.29</td>\n",
       "      <td>11.16</td>\n",
       "      <td>11.00</td>\n",
       "      <td>10.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>四川省</td>\n",
       "      <td>26.21</td>\n",
       "      <td>24.54</td>\n",
       "      <td>24.29</td>\n",
       "      <td>23.52</td>\n",
       "      <td>23.02</td>\n",
       "      <td>22.51</td>\n",
       "      <td>21.82</td>\n",
       "      <td>20.59</td>\n",
       "      <td>18.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>贵州省</td>\n",
       "      <td>8.99</td>\n",
       "      <td>8.96</td>\n",
       "      <td>9.64</td>\n",
       "      <td>9.47</td>\n",
       "      <td>9.18</td>\n",
       "      <td>8.67</td>\n",
       "      <td>8.15</td>\n",
       "      <td>6.44</td>\n",
       "      <td>6.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>云南省</td>\n",
       "      <td>12.36</td>\n",
       "      <td>11.51</td>\n",
       "      <td>11.37</td>\n",
       "      <td>10.82</td>\n",
       "      <td>10.49</td>\n",
       "      <td>10.32</td>\n",
       "      <td>10.06</td>\n",
       "      <td>9.70</td>\n",
       "      <td>9.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>西藏自治区</td>\n",
       "      <td>0.70</td>\n",
       "      <td>0.72</td>\n",
       "      <td>0.73</td>\n",
       "      <td>0.68</td>\n",
       "      <td>0.61</td>\n",
       "      <td>0.58</td>\n",
       "      <td>0.60</td>\n",
       "      <td>0.61</td>\n",
       "      <td>0.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>陕西省</td>\n",
       "      <td>18.14</td>\n",
       "      <td>17.78</td>\n",
       "      <td>17.75</td>\n",
       "      <td>17.20</td>\n",
       "      <td>16.74</td>\n",
       "      <td>16.46</td>\n",
       "      <td>16.10</td>\n",
       "      <td>15.94</td>\n",
       "      <td>16.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>甘肃省</td>\n",
       "      <td>7.55</td>\n",
       "      <td>7.61</td>\n",
       "      <td>7.40</td>\n",
       "      <td>7.30</td>\n",
       "      <td>7.28</td>\n",
       "      <td>7.16</td>\n",
       "      <td>7.23</td>\n",
       "      <td>7.10</td>\n",
       "      <td>7.28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>青海省</td>\n",
       "      <td>1.23</td>\n",
       "      <td>1.22</td>\n",
       "      <td>0.98</td>\n",
       "      <td>1.11</td>\n",
       "      <td>1.08</td>\n",
       "      <td>0.99</td>\n",
       "      <td>0.92</td>\n",
       "      <td>0.89</td>\n",
       "      <td>0.87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>宁夏回族自治区</td>\n",
       "      <td>2.53</td>\n",
       "      <td>2.41</td>\n",
       "      <td>2.31</td>\n",
       "      <td>2.20</td>\n",
       "      <td>2.12</td>\n",
       "      <td>2.04</td>\n",
       "      <td>1.95</td>\n",
       "      <td>1.89</td>\n",
       "      <td>1.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>7.22</td>\n",
       "      <td>6.40</td>\n",
       "      <td>6.35</td>\n",
       "      <td>5.68</td>\n",
       "      <td>5.27</td>\n",
       "      <td>4.83</td>\n",
       "      <td>4.23</td>\n",
       "      <td>4.02</td>\n",
       "      <td>3.79</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          地区   2022   2021   2020   2019   2018   2017   2016   2015   2014\n",
       "0        北京市  14.00  13.63  13.48  13.09  13.01  12.82  12.77  12.63  12.53\n",
       "1        天津市   9.15   8.96   9.14   9.02   8.91   8.57   8.51   8.21   8.11\n",
       "2        河北省  22.91  21.88  21.83  21.29  20.02  18.91  18.21  16.72  16.44\n",
       "3        山西省  12.49  12.48  12.57  12.28  12.20  12.11  11.98  11.67  11.30\n",
       "4     内蒙古自治区   6.44   6.38   6.35   6.32   6.28   6.24   6.26   5.96   5.85\n",
       "5        辽宁省  18.10  17.45  17.51  16.95  16.84  16.63  16.60  16.60  18.05\n",
       "6        吉林省  12.95  12.14  12.21  12.07  12.01  11.83  11.88  11.78  11.42\n",
       "7       黑龙江省  14.17  13.76  13.85  13.57  13.39  13.00  12.61  12.34  12.50\n",
       "8        上海市  10.04   9.82   9.82   9.57   9.58   9.51   9.31   8.92   8.84\n",
       "9        江苏省  30.01  28.73  28.30  27.43  27.18  26.74  26.88  25.60  25.06\n",
       "10       浙江省  16.76  15.62  15.59  15.16  15.09  14.62  14.54  14.80  14.85\n",
       "11       安徽省  18.19  17.37  16.94  16.61  16.39  16.04  16.05  15.76  15.23\n",
       "12       福建省  13.74  13.09  13.05  12.84  12.52  11.90  11.80  12.17  12.06\n",
       "13       江西省  17.27  15.52  15.30  14.57  14.18  13.49  13.51  12.38  12.68\n",
       "14       山东省  28.01  26.65  26.67  26.46  25.82  26.29  26.27  23.70  23.38\n",
       "15       河南省  31.52  29.73  29.29  28.73  27.99  25.80  25.62  24.17  23.55\n",
       "16       湖北省  23.71  22.47  22.35  21.74  21.46  21.30  21.28  20.77  20.38\n",
       "17       湖南省  22.48  20.10  19.57  18.88  18.39  17.83  17.32  16.77  16.54\n",
       "18       广东省  31.09  29.37  29.71  28.82  28.28  27.66  27.51  26.96  26.15\n",
       "19   广西壮族自治区  14.62  13.34  13.62  13.00  12.52  11.79  11.48  10.62   9.40\n",
       "20       海南省   3.08   2.99   3.15   3.12   2.92   2.80   2.80   2.70   2.60\n",
       "21       重庆市  12.27  11.97  11.98  11.77  11.39  11.29  11.16  11.00  10.61\n",
       "22       四川省  26.21  24.54  24.29  23.52  23.02  22.51  21.82  20.59  18.50\n",
       "23       贵州省   8.99   8.96   9.64   9.47   9.18   8.67   8.15   6.44   6.57\n",
       "24       云南省  12.36  11.51  11.37  10.82  10.49  10.32  10.06   9.70   9.60\n",
       "25     西藏自治区   0.70   0.72   0.73   0.68   0.61   0.58   0.60   0.61   0.56\n",
       "26       陕西省  18.14  17.78  17.75  17.20  16.74  16.46  16.10  15.94  16.84\n",
       "27       甘肃省   7.55   7.61   7.40   7.30   7.28   7.16   7.23   7.10   7.28\n",
       "28       青海省   1.23   1.22   0.98   1.11   1.08   0.99   0.92   0.89   0.87\n",
       "29   宁夏回族自治区   2.53   2.41   2.31   2.20   2.12   2.04   1.95   1.89   1.90\n",
       "30  新疆维吾尔自治区   7.22   6.40   6.35   5.68   5.27   4.83   4.23   4.02   3.79"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "2a24d911-d998-4aab-878e-5f8a30a2cf67",
   "metadata": {},
   "outputs": [],
   "source": [
    "list1 = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e438c990-0271-4187-ad92-596faec8cc93",
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(2014,2023):\n",
    "    list1.append(df[str(i)].sum())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "421d79cd-a9cb-4b51-8b8b-9dd81b5cc022",
   "metadata": {},
   "outputs": [],
   "source": [
    "list_1 = np.array(list1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "354d23a6-35f9-4114-a224-3cea40bb11c9",
   "metadata": {},
   "outputs": [],
   "source": [
    "list1 = np.round(list_1,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "89e500db-e4d2-4237-b25a-10af58ba6429",
   "metadata": {},
   "outputs": [],
   "source": [
    "list1 = list1.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "dcdd8426-a740-47ab-b555-b687cd8d650a",
   "metadata": {},
   "outputs": [],
   "source": [
    "list2 = ['2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021',\n",
    "       '2022']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "3bf866d2-03de-41ee-bf70-db34839e8796",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.charts import Line\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "5308b887-94ad-47a6-9399-dd1d5d1f7d57",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'C:\\\\Users\\\\86139\\\\Desktop\\\\line.html'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "line = Line()\n",
    "line.add_xaxis(list2)\n",
    "line.add_yaxis(series_name = \"高校本科招生数\",y_axis = list1)\n",
    "line.render(\"line.html\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "5a95b7d0-9878-4c6d-9e54-42b897589db8",
   "metadata": {},
   "outputs": [],
   "source": [
    "df1 = df[\"地区\"].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "659e6b69-9651-4f8d-8241-2397ded3a047",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['北京市', '天津市', '河北省', '山西省', '内蒙古自治区', '辽宁省', '吉林省', '黑龙江省', '上海市',\n",
       "       '江苏省', '浙江省', '安徽省', '福建省', '江西省', '山东省', '河南省', '湖北省', '湖南省',\n",
       "       '广东省', '广西壮族自治区', '海南省', '重庆市', '四川省', '贵州省', '云南省', '西藏自治区',\n",
       "       '陕西省', '甘肃省', '青海省', '宁夏回族自治区', '新疆维吾尔自治区'], dtype=object)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "68838f9f-ecbf-466e-b30b-6f3a31ca461e",
   "metadata": {},
   "outputs": [],
   "source": [
    "list3 = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "8a56f4b8-890f-4e59-bbee-5b484061b9b2",
   "metadata": {},
   "outputs": [],
   "source": [
    "for j in df1:\n",
    "    df2 = df.loc[df[\"地区\"]==j]\n",
    "    list3.append(df2.mean(axis=1,numeric_only=True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "a6839c58-c8a9-4783-aa33-49b11f24ccd8",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.charts import Bar\n",
    "from pyecharts import options as opts\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "821473b9-c31c-4344-b5a1-b6292a3174ef",
   "metadata": {},
   "outputs": [],
   "source": [
    "list4 = df1.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "9df599c5-f73f-49d7-9c66-9020d9ce47a6",
   "metadata": {},
   "outputs": [],
   "source": [
    "list_3 = np.array(list3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "14315208-b34b-4842-8e08-0ec48940e167",
   "metadata": {},
   "outputs": [],
   "source": [
    "list3 = np.round(list_3,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "35d1cc25-8d38-4db3-ade4-24ed6c5e0dd8",
   "metadata": {},
   "outputs": [],
   "source": [
    "sum1 = list3.sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "edadf87b-20d2-4c3c-85b8-669c173fdd13",
   "metadata": {},
   "outputs": [],
   "source": [
    "sum1 = np.round(sum1,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "36bb64dc-9980-421b-a675-93c4ba1fd818",
   "metadata": {},
   "outputs": [],
   "source": [
    "list5 = list3.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "c4c2045f-0b01-4f97-b3a8-346c1eb71c73",
   "metadata": {},
   "outputs": [],
   "source": [
    "list6 = [float(x) for item in list5 for x in item]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "9a5027e3-f0f5-4863-bf0a-bc93d9962e35",
   "metadata": {},
   "outputs": [],
   "source": [
    "list7 = list3/sum1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "3efd3858-d90d-42bf-9968-269e0fc5684c",
   "metadata": {},
   "outputs": [],
   "source": [
    "list_7 = np.array(list7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "ce6f1abe-99a0-445e-98e4-a67ccc1a164c",
   "metadata": {},
   "outputs": [],
   "source": [
    "list7 = np.round(list_7,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "6aca7c68-edc5-4024-ac7c-2d5a64664d8c",
   "metadata": {},
   "outputs": [],
   "source": [
    "list8 = list7.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "addd26ce-f93f-43c5-8b92-44b11ef1775d",
   "metadata": {},
   "outputs": [],
   "source": [
    "list9 = [float(x) for item in list8 for x in item]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "bfb9b208-7da1-4d38-86d3-202c57129e70",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.charts import Pie\n",
    "from pyecharts import options as opts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "161d4305-c7ca-4d1f-83e3-ad0e8f93f458",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'C:\\\\Users\\\\86139\\\\Desktop\\\\pie.html'"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pie = Pie()\n",
    "pie.add(\"\",[list(z) for z in zip(list4, list9)],center=[\"30%\",\"60%\"])\n",
    "pie.set_global_opts(title_opts=opts.TitleOpts(title=\"高校本科招生数\"),\n",
    "                   legend_opts=opts.LegendOpts(pos_right=\"80\",orient=\"vertical\"))\n",
    "pie.render(\"pie.html\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "0190eac7-4ad9-4489-a13d-15ce0b1dd82d",
   "metadata": {},
   "outputs": [],
   "source": [
    "df3 = pd.read_excel(\"C:/Users/86139/Desktop/高等教育数据.xlsx\",sheet_name=\"Sheet2\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "ec6cd857-4769-45d8-bc18-8b111bebddf7",
   "metadata": {},
   "outputs": [],
   "source": [
    "list10 = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "4e19842b-fbb5-4ba3-9938-f21c76e2f2af",
   "metadata": {},
   "outputs": [],
   "source": [
    "for k in df1:\n",
    "    df4 = df3.loc[df3[\"地区\"]==k]\n",
    "    list10.append(df4.mean(axis=1,numeric_only=True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "f487ff83-ab8e-41e6-abb6-32dce22f53ed",
   "metadata": {},
   "outputs": [],
   "source": [
    "list_10 = np.array(list10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "f77465b3-fde4-4500-88a5-9dbfee1ba78e",
   "metadata": {},
   "outputs": [],
   "source": [
    "list10 = np.round(list_10,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "b9a6e328-03f0-4200-a09e-f0014933753f",
   "metadata": {},
   "outputs": [],
   "source": [
    "list11 = list10.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "ea060b3e-9cc7-4c3e-ac6a-1c5fcf8ec31e",
   "metadata": {},
   "outputs": [],
   "source": [
    "list12 = [float(x) for item in list11 for x in item]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "9165785d-b0d7-4450-82e0-fd4a43a99e05",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'C:\\\\Users\\\\86139\\\\Desktop\\\\bar.html'"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar()\n",
    "bar.add_xaxis(list4)\n",
    "bar.add_yaxis(\"高校本科招生数\",list6)\n",
    "bar.add_yaxis(\"高校教职工数\",list12)\n",
    "bar.set_global_opts(xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=45)))\n",
    "bar.render(\"bar.html\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "ca511d6a-3059-48db-af34-423f0c5f678c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[383.44, 389.41, 405.41, 410.73, 422.16, 431.27, 443.1, 444.6, 467.93]"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "a1f389f1-3849-4573-a10a-db55679072db",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['北京市',\n",
       " '天津市',\n",
       " '河北省',\n",
       " '山西省',\n",
       " '内蒙古自治区',\n",
       " '辽宁省',\n",
       " '吉林省',\n",
       " '黑龙江省',\n",
       " '上海市',\n",
       " '江苏省',\n",
       " '浙江省',\n",
       " '安徽省',\n",
       " '福建省',\n",
       " '江西省',\n",
       " '山东省',\n",
       " '河南省',\n",
       " '湖北省',\n",
       " '湖南省',\n",
       " '广东省',\n",
       " '广西壮族自治区',\n",
       " '海南省',\n",
       " '重庆市',\n",
       " '四川省',\n",
       " '贵州省',\n",
       " '云南省',\n",
       " '西藏自治区',\n",
       " '陕西省',\n",
       " '甘肃省',\n",
       " '青海省',\n",
       " '宁夏回族自治区',\n",
       " '新疆维吾尔自治区']"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "a2b4440a-9b74-44f6-8b94-0af6ba3bb433",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[13.11],\n",
       "       [ 8.73],\n",
       "       [19.8 ],\n",
       "       [12.12],\n",
       "       [ 6.23],\n",
       "       [17.19],\n",
       "       [12.03],\n",
       "       [13.24],\n",
       "       [ 9.49],\n",
       "       [27.33],\n",
       "       [15.23],\n",
       "       [16.51],\n",
       "       [12.57],\n",
       "       [14.32],\n",
       "       [25.92],\n",
       "       [27.38],\n",
       "       [21.72],\n",
       "       [18.65],\n",
       "       [28.39],\n",
       "       [12.27],\n",
       "       [ 2.91],\n",
       "       [11.49],\n",
       "       [22.78],\n",
       "       [ 8.45],\n",
       "       [10.69],\n",
       "       [ 0.64],\n",
       "       [16.99],\n",
       "       [ 7.32],\n",
       "       [ 1.03],\n",
       "       [ 2.15],\n",
       "       [ 5.31]])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "d4bf9a70-b3d0-4de6-8457-8b80c4e375e3",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[13.11],\n",
       " [8.73],\n",
       " [19.8],\n",
       " [12.12],\n",
       " [6.23],\n",
       " [17.19],\n",
       " [12.03],\n",
       " [13.24],\n",
       " [9.49],\n",
       " [27.33],\n",
       " [15.23],\n",
       " [16.51],\n",
       " [12.57],\n",
       " [14.32],\n",
       " [25.92],\n",
       " [27.38],\n",
       " [21.72],\n",
       " [18.65],\n",
       " [28.39],\n",
       " [12.27],\n",
       " [2.91],\n",
       " [11.49],\n",
       " [22.78],\n",
       " [8.45],\n",
       " [10.69],\n",
       " [0.64],\n",
       " [16.99],\n",
       " [7.32],\n",
       " [1.03],\n",
       " [2.15],\n",
       " [5.31]]"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "cc4edd30-5f33-45ee-bb82-5df5b0aebf96",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[13.11,\n",
       " 8.73,\n",
       " 19.8,\n",
       " 12.12,\n",
       " 6.23,\n",
       " 17.19,\n",
       " 12.03,\n",
       " 13.24,\n",
       " 9.49,\n",
       " 27.33,\n",
       " 15.23,\n",
       " 16.51,\n",
       " 12.57,\n",
       " 14.32,\n",
       " 25.92,\n",
       " 27.38,\n",
       " 21.72,\n",
       " 18.65,\n",
       " 28.39,\n",
       " 12.27,\n",
       " 2.91,\n",
       " 11.49,\n",
       " 22.78,\n",
       " 8.45,\n",
       " 10.69,\n",
       " 0.64,\n",
       " 16.99,\n",
       " 7.32,\n",
       " 1.03,\n",
       " 2.15,\n",
       " 5.31]"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "0ac78428-412e-4943-9300-25b096ec1280",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['北京市',\n",
       " '天津市',\n",
       " '河北省',\n",
       " '山西省',\n",
       " '内蒙古自治区',\n",
       " '辽宁省',\n",
       " '吉林省',\n",
       " '黑龙江省',\n",
       " '上海市',\n",
       " '江苏省',\n",
       " '浙江省',\n",
       " '安徽省',\n",
       " '福建省',\n",
       " '江西省',\n",
       " '山东省',\n",
       " '河南省',\n",
       " '湖北省',\n",
       " '湖南省',\n",
       " '广东省',\n",
       " '广西壮族自治区',\n",
       " '海南省',\n",
       " '重庆市',\n",
       " '四川省',\n",
       " '贵州省',\n",
       " '云南省',\n",
       " '西藏自治区',\n",
       " '陕西省',\n",
       " '甘肃省',\n",
       " '青海省',\n",
       " '宁夏回族自治区',\n",
       " '新疆维吾尔自治区']"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "2621568d-e8b6-44d4-b5c4-4fb420bb755e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0.03,\n",
       " 0.02,\n",
       " 0.05,\n",
       " 0.03,\n",
       " 0.01,\n",
       " 0.04,\n",
       " 0.03,\n",
       " 0.03,\n",
       " 0.02,\n",
       " 0.06,\n",
       " 0.04,\n",
       " 0.04,\n",
       " 0.03,\n",
       " 0.03,\n",
       " 0.06,\n",
       " 0.06,\n",
       " 0.05,\n",
       " 0.04,\n",
       " 0.07,\n",
       " 0.03,\n",
       " 0.01,\n",
       " 0.03,\n",
       " 0.05,\n",
       " 0.02,\n",
       " 0.03,\n",
       " 0.0,\n",
       " 0.04,\n",
       " 0.02,\n",
       " 0.0,\n",
       " 0.01,\n",
       " 0.01]"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "b69f14ec-db6b-4ebd-980f-70a5967aa618",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[13.11],\n",
       "       [ 8.73],\n",
       "       [19.8 ],\n",
       "       [12.12],\n",
       "       [ 6.23],\n",
       "       [17.19],\n",
       "       [12.03],\n",
       "       [13.24],\n",
       "       [ 9.49],\n",
       "       [27.33],\n",
       "       [15.23],\n",
       "       [16.51],\n",
       "       [12.57],\n",
       "       [14.32],\n",
       "       [25.92],\n",
       "       [27.38],\n",
       "       [21.72],\n",
       "       [18.65],\n",
       "       [28.39],\n",
       "       [12.27],\n",
       "       [ 2.91],\n",
       "       [11.49],\n",
       "       [22.78],\n",
       "       [ 8.45],\n",
       "       [10.69],\n",
       "       [ 0.64],\n",
       "       [16.99],\n",
       "       [ 7.32],\n",
       "       [ 1.03],\n",
       "       [ 2.15],\n",
       "       [ 5.31]])"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "a5ea83ab-7f6e-4330-b1a2-61aeb3176647",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[383.44, 389.41, 405.41, 410.73, 422.16, 431.27, 443.1, 444.6, 467.93]"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5bdc3230-7820-4ba5-8e50-827eca77706c",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "86300a59-d687-4686-b5ad-8bb3a2eaa961",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
